<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改包保配置')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-deptPackageOrg-edit" th:object="${ecardDeptPackageOrg}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">部门：</label>
            <div class="col-sm-8">
                <select name="deptId" class="form-control m-b" th:with="type=${@dept.selectDeptListByType('4')}"
                        disabled>
                    <option value="">请选择</option>
                    <option th:each="dept : ${type}" th:text="${dept.deptName}" th:value="${dept.deptId}"
                            th:field="*{deptId}">
                    </option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">包保支行：</label>
            <div class="col-sm-8">
                <select name="orgId" class="form-control m-b" th:with="type=${@dept.selectDeptListByType('3')}"
                        required>
                    <option value="">请选择</option>
                    <option th:each="dept : ${type}" th:text="${dept.deptName}" th:value="${dept.deptId}"
                            th:field="*{orgId}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">打卡范围(米)：</label>
            <div class="col-sm-9">
                <input name="scopeLimit" th:field="*{scopeLimit}" class="form-control" type="number" maxlength="4"
                       required>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "config/deptPackageOrg";
    $("#form-deptPackageOrg-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-deptPackageOrg-edit').serialize());
        }
    }
</script>
</body>
</html>